Skip to content

Commit 01596a6

Browse files
authored
chore: add migration guide for breaking change to get_ancestors (#634)
1 parent f641d15 commit 01596a6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/reference/migrations.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,24 @@ This page can help when migrating Taskgraph across major versions.
1919
for it manually. If ``use-caches`` was previously set to ``false``, omit
2020
``checkout`` in the example above. If ``use-caches`` was previously set to
2121
``true``, replace ``true`` with the value above (including ``checkout``).
22+
* Invert any usage of the dict keys and values returned by `get_ancestors`:
23+
24+
For example, if you were using:
25+
26+
.. code-block:: python
27+
28+
for label, taskid in get_ancestors(...):
29+
...
30+
31+
Change it to:
32+
33+
.. code-block:: python
34+
35+
for taskid, label in get_ancestors(...):
36+
...
37+
38+
Note that due to this change `get_ancestors` may return multiple tasks with
39+
the same label now, which your code may need to deal with.
2240

2341
11.x -> 12.x
2442
------------

0 commit comments

Comments
 (0)